<template>
	<view class="container">
		<view>
			<button @click="handleLogin">点击登录</button>
		</view>

		<view style="margin-top: 20rpx;">
			<text>用户信息：</text>
			<text>{{ userStore.userInfo }}</text>
		</view>
	</view>
</template>

<script setup>
	import {
		useUserStore
	} from '@/store/user'

	const userStore = useUserStore()

	const handleLogin = async () => {
		const res = await userStore.login({
			phone: '13512312311',
			password: '123'
		})
		console.log('登录结果', res)
	}
</script>